//
//  MsgCell.m
//  Traveling
//
//  Created by Northwan on 15/6/3.
//  Copyright (c) 2015年 长沙市岳麓区立早网络科技有限公司. All rights reserved.
//

#import "MsgCell.h"


@interface MsgCell()
@property (weak, nonatomic) IBOutlet UIImageView *iconView;
@property (weak, nonatomic) IBOutlet UILabel *titleLabel;
@property (weak, nonatomic) IBOutlet UILabel *subtitleLabel;

@end
@implementation MsgCell
+(instancetype)cellWithTableView:(UITableView *)tableView{
    static  NSString  *CellIdentiferId = @"MsgCell";
    MsgCell  *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentiferId];
    if (cell == nil) {
        NSArray *nibs = [[NSBundle mainBundle]loadNibNamed:@"MsgCell" owner:nil options:nil];
        cell = [nibs lastObject];
    }
    return cell;
}
- (void)awakeFromNib {
    // Initialization code
}

-(void)initData:(MessageResult *)result{
    [self.iconView sd_setImageWithURL:[NSURL URLWithString:result.image]];
    [self.titleLabel setText:result.title];
    [self.subtitleLabel setText:result.desc];
}

@end
